{template '_header'}

<style>

    .popover{

        width:170px;

        font-size:12px;

        line-height: 21px;

        color: #0d0706;

    }

    .popover span{

        color: #b9b9b9;

    }

    .nickname{

        display: inline-block;

        max-width:150px;

        overflow: hidden;

        text-overflow:ellipsis;

        white-space: nowrap;

        vertical-align: middle;

    }
    .page-toolbar{
        display: none;
    }
    .btn-group{
        display: none;
    }
    .page-table-header{
        display: none;
    }


    .tooltip-inner{

        border:none;

    }

</style>

<div class="page-header" style="float: left;">

    当前位置：<span class="text-primary">自购返利 / 我的订单</span>

</div>
<!--<div class="page-header" style="float: right;font-size: 20px;">-->

    <!--<span class="text-default">我的订单 : <b style="color: red;">{$num}套</b></span> /<span class="text-default">可获得奖金 : <b style="color: red;">¥ :{php echo number_format($price,2)}</b></span>-->
    <!--{if !$fafang}-->
    <!--<a href="{php echo webUrl('dividend/statistics/order/fafangPrice',array('id' => $_GPC['id'],'price' => $price))}"><button class="label label-success">发放</button></a>-->
    <!--{else}-->
    <!--<button class="label label-default">已发放</button>-->
    <!--{/if}-->

<!--</div>-->
<div class="page-content">
    {if count($list)>0}
    {loop $list $k $v}
    <div class="fui-cell-group">
        <div class="fui-cell"style="    height: 2.85rem;">
            <div class="fui-cell-text">
                <span style="color: red;text-align: center;"><h2>{php echo $firstyear + $k}年绩效</h2></span>
            </div>
        </div>
    </div>
    <table class="table table-hover table-responsive">

        <thead class="navbar-inner" >

        <tr>

            <th style="width:25px;"></th>

            <th style='width:100px;'>会员</th>

            <!-- By QQ:834633039 -->
            <th style='width:100px;'>季度</th>

            <th style='width:90px;'>总金额</th>

            <th style='width:110px;'>获得奖励</th>

            <th style='width:70px;'>发放奖励</th>

        </tr>

        </thead>

        <tbody>

        {loop $list[$k] $key $row}

        <tr >

            <td>

                <input type='checkbox'   value="{$row['id']}"/>

            </td>



            <td style="overflow: visible">
                {$member['nickname']}
            </td>



            <td>第{php echo $key + 1}季度</td>
            <td>{php echo number_format($row['price'],2)}</td>



            <!-- By QQ:834633039 -->







            <td>

                {php echo number_format($row['fanli'],2)}

            </td>











            <td  style="overflow:visible;">

                {if $row['status']}
                    <button class="btn btn-danger">已发放</button>

                {else}
                    {if $row['fanli']}
                        <a href="{php echo webUrl('dividend/member/give', array('time'=>($firstyear + $k).'-'.($key + 1),'openid'=>$member['openid'],'price'=>$row['fanli'],'id' => $member['id'],'message' => ($firstyear + $k).'年第'.($key + 1)))}"><button class="btn btn-success">发放奖励</button></a>
                    {else}
                        <button class="btn btn-primary">无奖金</button>
                    {/if}
                {/if}

            </td>

        </tr>

        {/loop}

        </tbody>

    </table>
    {/loop}

    {else}

    <div class='panel panel-default'>

        <div class='panel-body' style='text-align: center;padding:30px;'>

            暂时没有任何订单!

        </div>

    </div>

    {/if}

</div>

<script language="javascript">







    require(['bootstrap'],function(){

        $("[rel=pop]").popover({

            trigger:'manual',

            placement : 'right',

            title : $(this).data('title'),

            html: 'true',

            content : $(this).data('content'),

            animation: false

        }).on("mouseenter", function () {

            var _this = this;

            $(this).popover("show");

            $(this).siblings(".popover").on("mouseleave", function () {

                $(_this).popover('hide');

            });

        }).on("mouseleave", function () {

            var _this = this;

            setTimeout(function () {

                if (!$(".popover:hover").length) {

                    $(_this).popover("hide")

                }

            }, 100);

        });





    });





</script>



{template '_footer'}